pkgname=mksh
pkgver=R39c
pkgrel=1
pkgdesc="The MirOS KornShell - an enhanced version of the public domain ksh"
url="https://mirbsd.de/mksh"
license=('MirOS')
depends=(glibc)
makedepends=(glibc cpio)
arch=('ppc')
install=(mksh.install)
source=(mksh.install \
	http://pub.allbsd.org/MirOS/dist/mir/${pkgname}/${pkgname}-${pkgver}.cpio.gz)
md5sums=('f2a210c14bd48e893c6a5b2fcf87335b'
         '0c3cd172b47eefcdf9a302baa42f5092')
build() {
   cd $startdir/src/
   # makepkg can't extract cpio files
   cpio -mid < $pkgname-$pkgver.cpio
   cd $startdir/src/$pkgname
   
   # build and install
   sh Build.sh -r -combine
	 # test
	 #sh test.sh -v
	 
   mkdir -p $startdir/pkg/bin
   mkdir -p $startdir/pkg/usr/share/{man/man1,mksh}
   install -cm 555 mksh $startdir/pkg/bin/mksh
   install -cm 444 mksh.1 $startdir/pkg/usr/share/man/man1/mksh.1
   install -cm 644 dot.mkshrc $startdir/pkg/usr/share/mksh/dot.mkshrc
}
